﻿@model System.Collections.Generic.IEnumerable<Smartflow.WorkflowStructure>
@using Smartflow
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>Smartflow-Sharp 工作流程列表</title>
    <link href="~/Content/layui/css/layui.css" rel="stylesheet" />
    <style type="text/css">
        .layui-btn {border-radius: initial;}
    </style>
    <script src="~/Content/jquery.min.js"></script>
    <script src="~/Content/common.js"></script>
    <script type="text/javascript">
        function delWf(id) {
            if (window.confirm('删除？')) {
                $.ajax({
                    url: '@Url.Action("Delete", "Default")',
                    type: 'post',
                    data: { WFID: id },
                    success: function () {
                        document.location.href = '@Url.Action("List", "Default")';
                    }
                });
            }
        }
    </script>
</head>
<body>
    <br />
    <div class="layui-container">
        <div class="layui-btn-group">
            <input type="button" value="增加" class="layui-btn  layui-btn-sm" onclick="openWin('../../Smartflow.Web.Design/WorkflowDesign/Design', 960, 560)" />
        </div>
        <table class="layui-table">
            <thead>
                <tr>
                    <th>名称</th>
                    <th style="width:120px;text-align:center;">操作</th>
                </tr>
            </thead>
            <tbody>
                @foreach (WorkflowStructure wf in Model)
                {
                    <tr>
                        <td>@wf.APPELLATION</td>
                        <td style="width:120px;text-align:center;">
                            <a class="layui-btn layui-btn-xs" href="javascript:openWin('../../Smartflow.Web.Design/WorkflowDesign/Design?id=@wf.IDENTIFICATION',960,560)">修改</a>
                            <a class="layui-btn layui-btn-danger layui-btn-xs" href="javascript:delWf('@wf.IDENTIFICATION')">删除</a>
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</body>
</html>
